
Cost_Text:

 .db "COST;", 0

Money_Text:

 .db "[", 0



Lobster_Text:

 .db 92, 0

Zerotext:

 .db 0, 0, 0, 0, 0, 0

In_Group_And_Max_Text:

 .db "IN/GROUP", 0

Not_Enough_Crystals:

 .db "NOT/ENOUGH/BELTHIUM", 0

Text_Building_Processing_Unit:

 .db "PROCESSING/UNIT"

Friendly_Unit:

 .db "FRIENDLY"

HP_Text:
 
 .db "HP;///"

Too_Many_PUs:

 .db "CANNOT/ADD/MORE/PUS", 0


On_Hold_Text:

 .db "ON/HOLD;",0


Standard_Alert_Standard_Data:
 
 ld (Standard_Alert_Text), hl

 ld hl, 0
 ld (Standard_Alert_Timer), hl


 ret

Display_Resources_Earned:

 ld hl, (Money_Amount_Y)	;L has X coordinate
				;H has Y coordinate
 ld c, l
 ld b, h
 ld a, b
 add a, 3
 ld h, a

 ld (penCol), hl

 ld h, b

 ;Divide the X coordinate, H, by 8, so that we can
 ;get to the correct X byte on the screen

 ld l, c

 srl l \ srl l \ srl l

 ld a, 11

 sub l

 ;Get the width of the info-box sprite

 ld (Sprite_Width), a
 ld b, 10	;Sprite Height


 ld a, c
 
 ld l, h
 dec l

 ld ix, InfoBox + 12
 
 call Put_Sprite_Overwrite




;Start by displaying the amount of crystals the player
;has

 ld hl, cleartext
 ld de, ASCIINumber
 ld bc, 6
 ldir



 ld de, (Player1 + Player_Money)
 call bintobcd16
 
 ld hl, ASCIINumber + 5
 ld a, (Money_Text)
 ld (hl), a

 ld hl, ASCIINumber
 ld b, 6

 call Put_Text_B_Length


 

 ld hl, (Money_Amount_Y)

 

 ld a, l	;If a is greater than 40, we
		;are drawing a 3x3 menu and must avoid
		;displaying the amount of food
		;due to poor screen resolution.

 cp 40
 ret nc



 add a, 66
 ld l, a

 ld a, h
 add a, 3
 ld h, a

 ld (penCol), hl

 ld hl, cleartext
 ld de, ASCIINumber
 ld bc, 6
 ldir


 ld de, (Player1 + Player_Food)
 call bintobcd16
 
 ld hl, ASCIINumber + 5
 ld a, (Lobster_Text)
 ld (hl), a

 ld hl, ASCIINumber
 ld b, 6

 call Put_Text_B_Length

 ret
 

Alert_Player:

;First, place the text on the screen.

	ld hl, InfoBox + 12
	ld de, plotsscreen
	ld bc, 12*7
	ldir

	ld hl, 1 * 256 + 2

	ld (penCol), hl

	ld hl, (Standard_Alert_Text)
	Call Put_Text_Zero_End

	 ld hl, plotsscreen
 	ld b, 12 * 7

 ;HL is the position at plotsscreen to start.
 ;B is the number of bytes in plotsscreen the box should span.

_

 	ld a, %11111111

 	xor (hl)

 	ld (hl), a

	 inc hl

 	djnz -_

 	ret  






